from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.ie.service import Service
from selenium.webdriver.ie.webdriver import WebDriver
from webdriver_manager.chrome import ChromeDriverManager
#打开浏览器_驱动管理
ChromeIns=ChromeDriverManager().install()

##创建谷歌浏览器驱动对象
driver=webdriver.Chrome(service=Service(ChromeIns))
driver.get("https://www.baidu.com/")
ret=driver.find_elements(By.CSS_SELECTOR,"#hotsearch-content-wrapper  ")
for i in ret:
    print(i.text)#获取每个元素对应的文本信息
driver.quit()